import { ModuleConfig } from "@cool-midway/core";
import { ProviderMiddleware } from "./middleware/provider";
import { TenantMiddleware } from "./middleware/tenant";

export default () => {
    return {
        name: '服务人员模块',
        description: '服务人员模块',
        middlewares: [],
        globalMiddlewares: [ProviderMiddleware, TenantMiddleware],
        order: 0,
        // 短信
        sms: {
            // 验证码有效期，单位秒
            timeout: 60 * 3,
        },
        // jwt
        jwt: {
            // token 过期时间，单位秒
            expire: 60 * 60 * 24,
            // 刷新token 过期时间，单位秒
            refreshExpire: 60 * 60 * 24 * 30,
            // jwt 秘钥
            secret: 'e5632f53-4255-4dc5-8615-39fe1fca87bdx',
        },
    } as ModuleConfig;
}